package com.yjt.sousou.detail.parts;


import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yjt.sousou.R;
import com.yjt.sousou.detail.entity.PartsEntity;

import java.util.List;

/**
 * @author chs
 * date：2019-10-25 15:49
 * des：配件列表
 */
public class PartsListAdapter extends BaseQuickAdapter<PartsEntity.DataEntity, BaseViewHolder> {

    public PartsListAdapter(int layoutResId, @Nullable List<PartsEntity.DataEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PartsEntity.DataEntity item) {
        helper.setText(R.id.tv_name,item.getProname());
        helper.setText(R.id.tv_num_des,item.getXinghao());
        helper.setText(R.id.tv_price_des,item.getDanjia());
        helper.setText(R.id.tv_stock_des,item.getKucun());
        helper.setText(R.id.tv_has_selected,String.valueOf(item.getHave_num()));
    }
}
